<!-- 弹窗组件 -->
<script>
export default {
  props: {
    // * 弹窗开关
    dialogVisible: {
      type: Boolean,
      default: true,
    },
    title: {
      type: String,
      default: "",
    },
    tips: {
      type: String,
      default: "",
    }
  },
  data() {
    return {};
  },
};
</script>

<template>
  <el-dialog
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    width="500px"
    :visible="dialogVisible"
    @close="$emit('close')"
    class="dialog-tips"
  >
    <div class="content">
      <!-- <div class="icon-box">
        <i class="icon-circle">
          <i class="el-icon-document"></i>
        </i>
      </div> -->
      <!-- <p class="title"> “{{ title }}”</p> -->
      <p>{{ tips }}</p>
    </div>
    <div slot="footer" style="text-align: center">
      <template>
        <el-button
          type="primary"
          class="submit-btn"
          @click="$emit('close')"
          >确定</el-button
        >
      </template>
    </div>
  </el-dialog>
</template>

<style lang="scss">
.dialog-tips {
  z-index: 2999 !important;
}
.el-dialog {
  width: 50%;
  border-radius: 6px;
  .content {
    text-align: left;
    .title {
      font-family: PingFang SC;
      font-size: 22px;
      font-weight: 500;
      line-height: 28px;
      letter-spacing: 0em;
      text-align: left;
      padding-top: 20px;
      color: #101828;
    }
    p {
      font-family: PingFang SC;
      font-size: 16px;
      font-weight: 400;
      line-height: 20px;
      letter-spacing: 0em;
      text-align: left;
      padding-top: 10px;
    }
    .el-icon-document {
      position: relative;
      z-index: 9;
    }
    .icon-box {
      text-align: left;
      min-height: 60px;
      .icon-circle {
        width: 60px;
        height: 60px;
        text-align: center;
        line-height: 60px;
        display: inline-block;
        position: relative;
        i {
          color: #FA7298;
          font-size: 16px;
        }
        &::before {
          content: " ";
          display: inline-block;
          width: 48px;
          height: 48px;
          background: #Fce6ee;
          border-radius: 50%;
          position: absolute;
          top: 5px;
          left: 5px;
          opacity: .9;
        }
        &::after {
          content: " ";
          display: inline-block;
          width: 58px;
          height: 58px;
          background: #FEE6EE;
          border-radius: 50%;
          position: absolute;
          top: 0;
          left: 0;
          opacity: .4;
        }
      }
    }
  }
  
  .el-dialog__header {
    text-align: left;
    font-size: 16px;
    font-weight: 700;
  }
  .el-dialog__body {
    padding: 20px;
  }
  button.cancel-btn,
  button.submit-btn:not(.el-button--small) {
    padding: 0;
    height: 32px;
    line-height: 1;
    width: 60px;
    font-size: 14px;
  }

  button.cancel-btn {
    width: 60px;
    color: #212121;
    background-color: #e7e7e7;
    border-color: #e7e7e7;
  }
  button.submit-btn {
    color: #ffffff;
    background-color: #01a0d6;
    border-color: #01a0d6;
  }
  button.submit-btn.is-disabled,
  button.submit-btn.is-disabled:hover,
  button.submit-btn.is-disabled:focus,
  button.submit-btn.is-disabled:active {
    background-color: #01a0d6;
    border-color: #01a0d6;
  }
  button.submit-btn:not(.el-button--small) {
    width: 86px;
  }
  button.submit-btn.el-button--small {
    height: 24px;
    line-height: 1;
    margin-left: 10px;
  }
  .el-form-item__content {
    text-align: left;
  }
  .el-upload-list--picture-card .el-upload-list__item,
  .el-upload--picture-card {
    width: 50px;
    height: 50px;
  }
  .el-upload--picture-card {
    line-height: 1;
    .el-icon-plus {
      line-height: 50px;
    }
  }
  .upload-tip {
    font-size: 12px;
    color: #a5a5a5;
  }
}
</style>
